<%@ include file="/WEB-INF/jsp/taglib.jsp" %>

<jsp:useBean id="actionBean" scope="request" type="com.rupertjones.globalcron.web.EditHostAction" />

<s:layout-render name="/WEB-INF/jsp/layout.jsp" title="Global Cron" subtitle="Edit Host">
    <s:layout-component name="body">

    <s:form action="EditHost.action" beanclass="com.rupertjones.globalcron.web.EditHostAction">
        <s:errors/>
        <h1>Edit Host</h1>
        <table class="rounded-corner" align="center">
            <s:hidden name="host.id"/>
            <tr>
                <td>Name</td>
                <td>
                    <s:text name="host.name" style="width:240px;"/>
                </td>
            </tr>
            <tr>
                <td>Hostname</td>
                <td>
                    <s:text name="host.hostname" style="width:240px;"/>
                </td>
            </tr>
            <tr>
                <td>Timezone</td>
                <td>
                <s:select name="host.timezoneId" value="${actionBean.host.timezoneId}">
                <s:option value="">Select One</s:option>
                <s:options-collection collection="${actionBean.currentlyUsedTimezones}" value="id"/>
                <s:option value="">==================================</s:option>
                <s:options-collection collection="${actionBean.timezones}" value="id"/>
                </s:select>
                </td>
            </tr>
            <tr>
                <td>Enabled</td>
                <td>
                    <s:checkbox name="host.enabled" style="width:240px;"/>
                </td>
            </tr>
            <tr>
                <td colspan="2"><s:submit name="SaveOrUpdate" value="Save"/></td>
            </tr>
        </table>
        <p/>
    </s:form>

    </s:layout-component>
</s:layout-render>
